package com.itcam.interview.pro01javase;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author : Cammy.Wu
 * Description : Arrays.asList()把数组转换成集合大坑
 */

public class Demo01ArrayList {

    public static void main(String[] args) {

//        List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
        List<Integer> list = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));

        list.add(6);

        list.forEach(System.out::print);
    }
}
